import axios from 'axios'

export default class DeviceCollectService {
    static deviceCollectService = null

    static getInstance(){
        if(this.deviceCollectService == null){
            this.deviceCollectService = new DeviceCollectService()
        }
        return this.deviceCollectService
    }

    //添加
    save(params){
        return axios.post(`http://localhost/deviceCollects`,params)
    }

    //拿到部门
    getdept(){
        return axios.get(`http://localhost/deviceCollects/getdept`)
    }

    list(params){
        return axios.get(`http://localhost/deviceCollects`,{
            params
        })
    }

    listNopage(params){
        return axios.get(`http://localhost/deviceCollects/listNopage`,{
            params:params
        })
    }


    //修改
    update(params){
        return axios.put(`http://localhost/deviceCollects`,params)
    }

    selectEnclosures(attachIds){
        return axios.get(`http://localhost/deviceCollects/selectEnclosures/${attachIds}`)
    }
}